import request from '@/utils/request'
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
export function getDepartments() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`, // 又需要哦传递请求体,又需要传递id的
    method: 'put',
    data
  })
}
export function delDpartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
export function Departments(id) {
  return request({
    url: `/company/department/${id}`, // 不需要传递请求体,只需要传递id的
    method: 'post'
  })
}
